﻿using System;
using System.Linq;
using System.Collections.Generic;
using System.Diagnostics;
using System.Threading;
using System.Drawing;
using System.Windows.Forms;
using Styx;
using Styx.Combat.CombatRoutine;
using Styx.Helpers;
using Styx.Logic;
using Styx.Logic.Combat;
using Styx.Logic.Pathing;
using Styx.WoWInternals;
using Styx.WoWInternals.WoWObjects;
using Styx.Logic.POI;

namespace HarmoniousVigor
{
    public partial class DeathKnight : CharacterClass
    {
        public static DeathKnightSettings DeathKnightSettings
        {
            get
            {
                Utils.nullCheckCharacterSettings();
                return (DeathKnightSettings)HarmoniousVigor.CharacterSettings;
            }
        }
        public string[] talentTrees = { "Lowbie", "Blood", "Frost", "Unholy" };
        public override bool PullSpell()
        {
            if (getCurrentSpec().Equals(talentTrees[0], StringComparison.OrdinalIgnoreCase) || getCurrentSpec().Equals(talentTrees[3], StringComparison.OrdinalIgnoreCase))
            {
                if (unholyPullSpell())
                    return true;
            }
            else if (getCurrentSpec().Equals(talentTrees[1], StringComparison.OrdinalIgnoreCase))
            {
                if (bloodPullSpell())
                    return true;
            }
            else if (getCurrentSpec().Equals(talentTrees[2], StringComparison.OrdinalIgnoreCase))
            {
                if (frostPullSpell())
                    return true;
            }
            return false;
        }
        public override bool Heal()
        {
            if (getCurrentSpec().Equals(talentTrees[0], StringComparison.OrdinalIgnoreCase) || getCurrentSpec().Equals(talentTrees[3], StringComparison.OrdinalIgnoreCase))
            {
                if (unholyHeal())
                    return true;
            }
            else if (getCurrentSpec().Equals(talentTrees[1], StringComparison.OrdinalIgnoreCase))
            {
                if (bloodHeal())
                    return true;
            }
            else if (getCurrentSpec().Equals(talentTrees[2], StringComparison.OrdinalIgnoreCase))
            {
                if (frostHeal())
                    return true;
            }
            return false;
        }
        public override bool Buff()
        {
            if (getCurrentSpec().Equals(talentTrees[0], StringComparison.OrdinalIgnoreCase) || getCurrentSpec().Equals(talentTrees[3], StringComparison.OrdinalIgnoreCase))
            {
                if (unholyBuff())
                    return true;
            }
            else if (getCurrentSpec().Equals(talentTrees[1], StringComparison.OrdinalIgnoreCase))
            {
                if (bloodBuff())
                    return true;
            }
            else if (getCurrentSpec().Equals(talentTrees[2], StringComparison.OrdinalIgnoreCase))
            {
                if (frostBuff())
                    return true;
            }

            return false;
        }
        public override bool Combat()
        {
            if (getCurrentSpec().Equals(talentTrees[0], StringComparison.OrdinalIgnoreCase) || getCurrentSpec().Equals(talentTrees[3], StringComparison.OrdinalIgnoreCase))
            {
                if (unholyCombat())
                    return true;
            }
            else if (getCurrentSpec().Equals(talentTrees[1], StringComparison.OrdinalIgnoreCase))
            {
                if (bloodCombat())
                    return true;
            }
            else if (getCurrentSpec().Equals(talentTrees[2], StringComparison.OrdinalIgnoreCase))
            {
                if (frostCombat())
                    return true;
            }
            return false;
        }
        public override void checkGlyphs()
        {
            Utils.Log("DeathKnight check glyphs not implemented");
        }
        public override void checkTalents()
        {
            Utils.Log("DeathKnight check talents not implemented");
        }
        public override void talentsChanged()
        {
            Utils.Log("DeathKnight check talents not implemented");
        }
        public override string findSpec(int i)
        {
            return talentTrees[i];
        }
    }
}
